/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.financing.entity.finserviceorder;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 融资服务订单Entity
 * @author YY
 * @version 2021-03-16
 */
@Table(name="t_financing_service_order_detail", alias="a", columns={
		@Column(name="financing_service_order_detail_id", attrName="financingServiceOrderDetailId", label="融资服务订单明细ID", isPK=true),
		@Column(name="margin_ratio", attrName="marginRatio", label="保证金比例"),
		@Column(name="margin_amount", attrName="marginAmount", label="保证金金额"),
		@Column(name="interest_rate", attrName="interestRate", label="利率"),
		@Column(name="start_days", attrName="startDays", label="开始天数"),
		@Column(name="end_days", attrName="endDays", label="结束天数"),
		@Column(name="start_date", attrName="startDate", label="开始日期"),
		@Column(name="end_date", attrName="endDate", label="结束日期"),
		@Column(name="interest", attrName="interest", label="利息"),
		@Column(name="remark", attrName="remark", label="备注"),
		@Column(name="type", attrName="type", label="类型", comment="类型（1资方 2客户）"),
		@Column(name="row_number", attrName="rowNumber", label="阶段"),
		@Column(name="financing_service_order_id", attrName="financingServiceOrderId.financingServiceOrderId", label="融资服务订单ID"),
	}, orderBy="a.financing_service_order_detail_id ASC"
)
public class TfinancingServiceOrderDetail extends DataEntity<TfinancingServiceOrderDetail> {
	
	private static final long serialVersionUID = 1L;
	private String financingServiceOrderDetailId;		// 融资服务订单明细ID
	private String marginRatio;		// 保证金比例
	private Double marginAmount;		// 保证金金额
	private String interestRate;		// 利率
	private Long startDays;		// 开始天数
	private Long endDays;		// 结束天数
	private Date startDate;		// 开始日期
	private Date endDate;		// 结束日期
	private Double interest;		// 利息
	private String remark;		// 备注
	private String type;		// 类型（1资方 2客户）
	private Integer rowNumber;

	public Integer getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Integer rowNumber) {
		this.rowNumber = rowNumber;
	}

	private FinServiceOrder financingServiceOrderId;		// 融资服务订单ID 父类

	public TfinancingServiceOrderDetail() {
		this(null);
	}


	public TfinancingServiceOrderDetail(FinServiceOrder financingServiceOrderId){
		this.financingServiceOrderId = financingServiceOrderId;
	}
	
	public String getFinancingServiceOrderDetailId() {
		return financingServiceOrderDetailId;
	}

	public void setFinancingServiceOrderDetailId(String financingServiceOrderDetailId) {
		this.financingServiceOrderDetailId = financingServiceOrderDetailId;
	}
	
	@Length(min=0, max=10, message="保证金比例长度不能超过 10 个字符")
	public String getMarginRatio() {
		return marginRatio;
	}

	public void setMarginRatio(String marginRatio) {
		this.marginRatio = marginRatio;
	}
	
	public Double getMarginAmount() {
		return marginAmount;
	}

	public void setMarginAmount(Double marginAmount) {
		this.marginAmount = marginAmount;
	}
	
	@Length(min=0, max=10, message="利率长度不能超过 10 个字符")
	public String getInterestRate() {
		return interestRate;
	}

	public void setInterestRate(String interestRate) {
		this.interestRate = interestRate;
	}
	
	public Long getStartDays() {
		return startDays;
	}

	public void setStartDays(Long startDays) {
		this.startDays = startDays;
	}
	
	public Long getEndDays() {
		return endDays;
	}

	public void setEndDays(Long endDays) {
		this.endDays = endDays;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	public Double getInterest() {
		return interest;
	}

	public void setInterest(Double interest) {
		this.interest = interest;
	}
	
	@Length(min=0, max=255, message="备注长度不能超过 255 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public FinServiceOrder getFinancingServiceOrderId() {
		return financingServiceOrderId;
	}

	public void setFinancingServiceOrderId(FinServiceOrder financingServiceOrderId) {
		this.financingServiceOrderId = financingServiceOrderId;
	}

	@Override
	public String toString() {
		return "TfinancingServiceOrderDetail{" +
				"financingServiceOrderDetailId='" + financingServiceOrderDetailId + '\'' +
				", marginRatio='" + marginRatio + '\'' +
				", marginAmount=" + marginAmount +
				", interestRate='" + interestRate + '\'' +
				", startDays=" + startDays +
				", endDays=" + endDays +
				", startDate=" + startDate +
				", endDate=" + endDate +
				", interest=" + interest +
				", remark='" + remark + '\'' +
				", type='" + type + '\'' +
				", rowNumber=" + rowNumber +
				", financingServiceOrderId=" + financingServiceOrderId +
				'}';
	}
}